package cn.aimee.permission.util.screen;

import android.content.Context;
import android.graphics.Point;
import android.view.Display;
import android.view.WindowManager;

public class ScreenUtil {

    public static int[] getDeviceWH(Context context) {
        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
        Display display = wm.getDefaultDisplay();
        Point point = new Point();
        display.getRealSize(point);

        int[] wh = new int[2];
        wh[0] = point.x;
        wh[1] = point.y;
        return wh;
    }

}